<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>注册 - 三石影视</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
    
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#165DFF',
                        secondary: '#FF7D00',
                        dark: '#1E293B',
                        light: '#F8FAFC'
                    },
                    fontFamily: {
                        inter: ['Inter', 'sans-serif'],
                    },
                }
            }
        }
    </script>
</head>
<body class="bg-gray-50 font-inter text-dark">
    <!-- 导航栏 -->
    <header class="sticky top-0 z-50 bg-white/90 backdrop-blur-sm shadow-sm">
        <div class="container mx-auto px-4 py-3 flex items-center justify-between">
            <!-- logo -->
            <a href="/" class="flex-shrink-0 flex items-center space-x-1 z-10">
                <i class="fa fa-play-circle text-primary text-3xl"></i>
                <span class="text-xl font-bold text-primary">三石影视</span>
            </a>
        </div>
    </header>

    <main class="container mx-auto px-4 py-8">
        <div class="max-w-md mx-auto">
            <div class="bg-white rounded-xl shadow-sm p-8">
                <div class="text-center mb-8">
                    <h2 class="text-2xl font-bold mb-2">创建账号</h2>
                    <p class="text-gray-500">加入三石影视，开启精彩观影之旅</p>
                </div>

                {% if error %}
                <div class="bg-red-50 text-red-500 p-4 rounded-lg mb-6">
                    {{ error }}
                </div>
                {% endif %}

                <form method="post" action="{{ url_for('register') }}" class="space-y-6">
                    <div>
                        <label for="username" class="block text-sm font-medium text-gray-700 mb-2">用户名</label>
                        <input type="text" id="username" name="username" required
                               class="w-full px-4 py-2 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-primary/50"
                               placeholder="请输入用户名">
                    </div>
                    
                    <div>
                        <label for="email" class="block text-sm font-medium text-gray-700 mb-2">邮箱</label>
                        <input type="email" id="email" name="email" required
                               class="w-full px-4 py-2 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-primary/50"
                               placeholder="请输入邮箱">
                    </div>
                    
                    <div>
                        <label for="password" class="block text-sm font-medium text-gray-700 mb-2">密码</label>
                        <input type="password" id="password" name="password" required
                               class="w-full px-4 py-2 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-primary/50"
                               placeholder="请输入密码">
                    </div>
                    
                    <div>
                        <label for="confirm_password" class="block text-sm font-medium text-gray-700 mb-2">确认密码</label>
                        <input type="password" id="confirm_password" name="confirm_password" required
                               class="w-full px-4 py-2 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-primary/50"
                               placeholder="请再次输入密码">
                    </div>
                    
                    <div class="flex items-center">
                        <input type="checkbox" id="agree" name="agree" required
                               class="h-4 w-4 text-primary focus:ring-primary border-gray-300 rounded">
                        <label for="agree" class="ml-2 block text-sm text-gray-700">
                            我已阅读并同意
                            <a href="#" class="text-primary hover:text-primary/80">服务条款</a>
                            和
                            <a href="#" class="text-primary hover:text-primary/80">隐私政策</a>
                        </label>
                    </div>
                    
                    <button type="submit"
                            class="w-full bg-primary text-white py-2 px-4 rounded-lg hover:bg-primary/90 transition-colors">
                        注册
                    </button>
                </form>
                
                <div class="mt-6 text-center">
                    <p class="text-gray-500">
                        已有账号？
                        <a href="{{ url_for('login') }}" class="text-primary hover:text-primary/80">立即登录</a>
                    </p>
                </div>
            </div>
        </div>
    </main>
</body>
</html> 